<?php
/**
 * @copyright	Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
 * @license		GNU/GPL, see LICENSE.php
 * Joomla! is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses.
 * See COPYRIGHT.php for copyright notices and details.
 */

// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );

if (!isset($this->error)) {
	$this->error = JError::raiseWarning( 404, JText::_('ALERTNOTAUTH') );
	$this->debug = false; 
}

if ($this->error->getCode() == '404') { header("HTTP/1.0 404 Not Found"); }
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>">
<head>
	<title>NRHC <?php echo $this->error->getCode(); ?> - <?php echo $this->title; ?></title>

	<link rel="shortcut icon" href="<?php echo $this->baseurl ?>/templates/nrhc/favicon.ico">

	<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/nrhc/css/error.css" type="text/css" media="all" />
	<?php if($this->direction == 'rtl') : ?>
	<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/system/css/error_rtl.css" type="text/css" />
	<?php endif; ?>
</head>
<body>
	<div id="errorbox">
		<div class="design">
			<p>These things happen. It&rsquo;d be embarassing if anyone found out, so we&rsquo;ll keep the whole thing confidential...
			<br/>
			<br/>
			Oops, already been <a href="http://twitter.com/nrhc">tweeted</a>.  Sorry.</p>
		</div>
		<div id="logo"><a href="<?php echo $this->baseurl; ?>/index.php" title="<?php echo JText::_('Go to the home page'); ?>"></a></div>
    <p class="action"><span class="errorcode">Error <?php echo $this->error->getCode(); ?> - <?php echo $this->error->getMessage(); ?></span><br/>
    NRHC has recently launched a new site design. This also affected our page structure. If you arrived here from a bookmark, please search for the page using the box below as it may have moved.<br/><br/>
    Return to the <a href="<?php echo $this->baseurl; ?>/index.php" title="<?php echo JText::_('Go to the home page'); ?>" class="logo"><?php echo JText::_('Home Page'); ?></a> or try using the search box:</p>
    <section id="global-search">
      <jdoc:include type="modules" name="nrhc-search" />
    </section>
	</div>
  <p>
    <?php if ($this->debug) :
      echo $this->renderBacktrace();
    endif; ?>
  </p>
</body>
</html>
